<%@ page pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib uri="http://www.ld.com/shield/tags" prefix="shield"%>
<%@ page trimDirectiveWhitespaces="true" %>
<fmt:setLocale value="zh_CN"/>
<%-- 权限判断 --%>
<shield:permssion type="button">
<table class="tab-list shield-table-odd">
    <tr>
        <th class="w50 taCenter">序号</th>
	    <th>监控名称</th>
	    <th>唯一识别码</th>
	    <th>监控路径</th>
	    <th>时间间隔（秒）</th>
	    <th>是否启动</th>
	    <th>创建人</th>
	    <th>创建时间</th>
        <th class="operate_icon">操作</th>
    </tr>
<c:forEach var="model" items="${pageBean.resultList }" varStatus="var">
    <tr>
        <td style="text-align: center;">${(pageBean.currentPage -1)*pageBean.pageSize+var.count }</td>
        
	   	<td title="${model.name }">${model.name }</td>
	   	<td title="${model.keyCode }">${model.keyCode }</td>
	   	<td title="${model.path }">${model.path }</td>
	   	<td title="${model.intervals }">${model.intervals }</td>
	   	<td title="${model.isStart == 1 ? "已启动" : "未启动" }">${model.isStart == 1 ? "已启动" : "未启动" }</td>
	   	<td title="${model.createName }【id:${model.createBy }】">${model.createName }</td>
	   	<td title="${model.createTime }">${model.createTime }</td>
        <td >
        	<!-- href改为data-url -->
	<c:if test="${model.isStart == 1 }">
			<a data-url="${ctxPathA }/system/filelistener/startOrStop?isstart=0" shieldParams="{'id':'${model.id }'}" class="shieldAjax" viewtitle="确定停止该监控？"><img 
        		src="${ctxPath }/images/icon/stopTask.png" class="c_p " title="停止监控"></a>
   	</c:if>
	<c:if test="${model.isStart != 1 }">
        	<a data-url="${ctxPathA }/system/filelistener/startOrStop?isstart=1" shieldParams="{'id':'${model.id }'}" class="shieldAjax" viewtitle="确定启动该监控？"><img 
        		src="${ctxPath }/images/icon/startTask.png" class="c_p " title="启动监控"></a>
   	</c:if>
            <a data-url="${ctxPathA }/system/filelistener/show" shieldParams="{'id':'${model.id }'}" class="shieldDialog shield-icon show" viewTitle="文件监听器详情" data-icon-title="查看文件监听器详情"
               viewWidth="800"></a>
            <a data-url="${ctxPathA }/system/filelistener/toAddOrUpdate" shieldParams="{'id':'${model.id }'}"  class="shieldDialog shield-icon update" viewTitle="修改文件监听器" data-icon-title="修改文件监听器"
               viewWidth="800"></a>
            <a data-url="${ctxPathA }/system/noticeaction/toAddOrUpdate" shieldParams="{'pkey':'${model.id }','keyCode':'sys_filelistener'}"  class="shieldDialog shield-icon notice" viewTitle="配置通知-文件监听器" data-icon-title="配置通知-文件监听器"
               viewWidth="800"></a>
               
            <a data-url="${ctxPathA }/system/filelistener/del" shieldParams="{'id':'${model.id }'}"  class="shieldAjax shield-icon del" viewTitle="确定要删除该条记录吗?"></a>
        </td>
    </tr>
</c:forEach>
<c:if test="${empty pageBean.resultList }">
    <!-- 无数据时展示，有数据时展示上面的列表 -->
    <tr>
        <td colspan="9" class="taCenter">暂无数据</td>
    </tr>
</c:if>
</table>
</shield:permssion>
<%@include file="/WEB-INF/view/a/include/pagination.jsp"%>